﻿@using WebApplication1.ViewModels
@model WebApplication1.ViewModels.EmployeeListViewModel
<!--强制类型引用定义-->
@*实验6 带有集合的View *@
@{
    Layout = "~/Views/Shared/MyLayout.cshtml";
}


@section TitleSection{
    MyView
}

@section ContentBody{
    @{
        Html.RenderAction("GetAddNewLink");
    }
    <table border="1">
        <tr>
            <th>Employee Name</th>
            <th>Salary</th>
        </tr>
        @foreach (EmployeeViewModel item in Model.Employees)
    {
            <tr>
                <td>@item.EmployeeName</td>
                <td style="background-color:@item.SalaryColor">@item.Salary</td>
            </tr>
        }
    </table>
}